//引入组件
var App = require('../app.jsx');
var Home = require('../pages/home.jsx');
var Type = require('../pages/type.jsx');
var Search = require('../pages/search.jsx');

//第二步定义路由
var Router = ReactRouter.Router;
var Route = ReactRouter.Route;
var IndexRoute = ReactRouter.IndexRoute;


// 第二步 定义路由
// console.log(ReactRouter)
//定义路由规则
var routes = (
    <Router>
        <Route path="/" component={App}>
            {/*定义子路由组件*/}
            <IndexRoute component={Home}></IndexRoute>
            <Route path="type/:id" component={Type}></Route>
            <Route path="search/:id" component={Search}></Route>
        </Route>
    </Router>
)
module.exports = routes;